<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@  taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@  taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>订单中心</title>
<link rel="stylesheet" href="static/css/dd-index1.css" />
<script type="text/javascript" src="static/js/jquery-3.1.0.js"></script>
</head>
<body>
	<jsp:include page="/WEB-INF/jsps/dd/dd_home.jsp">
		<jsp:param value="0" name="index" />
	</jsp:include>
	<div class="b-box">
		<div class="t-m">
			<span>我的订单</span>
		</div>
		<div class="n-br">
			<div class="g-g">
				<ul class="q-d-ul">
					<li>全部订单</li>
					<li>待付款</li>
					<li>待收货</li>
					<li>待评价</li>
				</ul>
				<div class="d-h-z">订单回收站</div>

				<div class="btn-b">
					<input type="text" placeholder="商品编号/商品名称/订单号" name="id" />
					<button>
						<b></b>
					</button>
				</div>
				<div class="x-f">
					<ul class="x-f-o-ul">
						<li>订单</li>
						<li>订单详情</li>
					</ul>

					<ul class="x-f-t-ul">
						<li>收货人</li>
						<li>金额</li>
						<li>状态</li>
						<li>操作</li>
					</ul>
				</div>
				<div style="clear:both;"></div>
				<div class="box-tab">
				<c:forEach items="${sp}" var="s">
				<c:if test="${fn:length(map[s.dd_id])!=0}">
					<div class="dddh"><span>${s.dd_time}</span> <span>订单号:</span><i id="dh">${s.dd_id}</i></div>
					
					<div class="shanchu" id="${s.dd_id}"></div>
					
					<table class="tb"  cellspacing="0">
						<c:forEach begin="0" end="${fn:length(map[s.dd_id])-1}" var="i">
						<tr>
							<td >
								<div class="sc">
									<div class="img"><img width="60px" height="60px" src="${map[s.dd_id][i].picture_path}"></div>
									<div class="p">${map[s.dd_id][i].shoop_Product}</div>
									<div class=s-l>x${map[s.dd_id][i].xd_num}</div>
								</div>
							</td>
							<c:if test="${i==0}">
								<td rowspan="${fn:length(map[s.dd_id])}" align="center">${map[s.dd_id][i].user_name}</td>
								<td rowspan="${fn:length(map[s.dd_id])}" align="center">总额${map[s.dd_id][i].dd_zmoney }</td>
								<td rowspan="${fn:length(map[s.dd_id])}" align="center">${map[s.dd_id][i].dd_ztai}</td>
								<td rowspan="${fn:length(map[s.dd_id])}" align="center"><button>立即购买</button></td>
							</c:if>
						</tr>
						</c:forEach>
					</table>
					</c:if>
					</c:forEach>
				</div>
				</div>
				<script type="text/javascript">
					$('.shanchu').click(function(){
						confirm("确认要删除该订单吗？");
						var a = $(this).attr('id');
						location.href="index1?id="+a;
					});
				</script>
			</div>
		</div>
</body>
</html>